<?php
/*********************************************************************************
 * SugarCRM Community Edition is a customer relationship management program developed by
 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
 * 
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License version 3 as published by the
 * Free Software Foundation with the addition of the following permission added
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU Affero General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 * 
 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by SugarCRM".
 ********************************************************************************/

$dictionary['edanz_Fees'] = array(
	'table'=>'edanz_fees',
	'audited'=>true,
 	 'fields' => 
	  array (
			'task_due_date' => array (
				'name' => 'task_due_date',
				'vname'=> 'LBL_TASK_DUE_DATE',
				'type' => 'varchar',
				'source' => 'non-db',
			),
			'task_assign_to' => array (
				'name' => 'task_assign_to',
				'vname'=> 'LBL_TASK_ASSIGN_TO',
				'type' => 'varchar',
				'source' => 'non-db',
			),
			'task_completion_date' => array (
				'name' => 'task_completion_date',
				'vname'=> 'LBL_COMPLETION_DATE',
				'type' => 'varchar',
				'source' => 'non-db',
			),
			'relate_job' => array (
				'name' => 'relate_job',
				'vname'=> 'LBL_RELATE_JOB',
				'type' => 'varchar',
				'source' => 'non-db',
			),
			'relate_job_id' => array (
				'name' => 'relate_job_id',
				'vname'=> 'LBL_RELATE_JOB_ID',
				'type' => 'id',
				'source' => 'non-db',
			),
			'relate_exper' => array (
				'name' => 'relate_exper',
				'vname'=> 'LBL_RELATE_EXPER',
				'type' => 'varchar',
				'source' => 'non-db',
			),
			'relate_exper_id' => array (
				'name' => 'relate_exper_id',
				'vname'=> 'LBL_RELATE_EXPER_ID',
				'type' => 'id',
				'source' => 'non-db',
			),
			'task_type' => array (
				'name' => 'task_type',
				'vname'=> 'LBL_TASK_TYPE',
				'type' => 'varchar',
				'source' => 'non-db',
			),
			'task_name' => array (
				'name' => 'task_name',
				'rname' => 'name',
				'type' => 'relate',
				'id_name' => 'task_id',
				'module' => 'Tasks',
				'link'=>'task_link',
//				'join_name' => 'tasks',
				'vname' => 'LBL_TASK_NAME',
				'source' => 'non-db',
				'required'=>true,
//				'duplicate_merge' => 'disabled',
			),
			'task_id' => array (
				'name' => 'task_id',
				'vname' => 'LBL_TASK_ID',
//				'rname'=> 'id',
				'type' => 'id',
				'table' => 'tasks',
//				'module' => 'Tasks',
				'massupdate' => true,
//		        'duplicate_merge'=> 'disabled',
			),
			'rate_name' => array (
				'name' => 'rate_name',
				'vname' => 'LBL_RATE_NAME',
				'rname' => 'name',
				'link'=>'rate_link',
				'type' => 'relate',
				'id_name' => 'rate_id',
				'module' => 'edanz_Rates',
				'source' => 'non-db',
				'join_name' => 'edanz_rates',
				'duplicate_merge' => 'disabled',
				'required'=>true,
			),
			'rate_id' => array (
				'name' => 'rate_id',
				'vname' => 'LBL_RATE_ID',
				'rname' => 'id',
				'type' => 'id',
				'table' => 'edanz_rates',
				'module' => 'edanz_Rates',
				'massupdate' => true,
		        'duplicate_merge'=> 'disabled',
			),
			'final_fee' => array (
				'name' => 'final_fee',
				'type' => 'double',
				'vname' => 'LBL_FINAL_FEE',
				'required'=>true,
			),
			'estimated_quantity' => array (
				'name' => 'estimated_quantity',
				'type' => 'double',
				'vname' => 'LBL_ESTIMATED_QUANTITY',
			),
			'actual_quantity' => array (
				'name' => 'actual_quantity',
				'type' => 'double',
				'vname' => 'LBL_ACTUAL_QUANTITY',
			),
			'fee' => array (
				'name' => 'fee',
				'type' => 'double',
				'vname' => 'LBL_FEE',
				'source' => 'non-db',
			),	
			'deliverable_name' => array (
				'name' => 'deliverable_name',
				'type' => 'varchar',
				'vname' => 'LBL_DELIVERABLE_NAME',
				'source' => 'non-db',
			),
			'related_deliverable_id' => array (
				'name' => 'related_deliverable_id',
				'type' => 'id',
				'vname' => 'LBL_RELATED_DELIVERABLE_ID',
				'source' => 'non-db',
			),		
			'deliverable_type' => array (
				'name' => 'deliverable_type',
				'type' => 'varchar',
				'vname' => 'LBL_DELIVERABLE_TYPE',
				'source' => 'non-db',
			),	
			'security_group' => array (
				'name' => 'security_group ',
				'type' => 'multienum',
				'vname' => 'LBL_SECURITY_GROUP ',
				'source' => 'non-db',
				'options' => 'security_group_list',
			),
			
	  ),
	  'relationships' => 
	  array (
	  ),

  'optimistic_locking'=>true,
		'unified_search'=>true,
	);
	
// Security Suite Groups
global $beanList;
if (isset($beanList['SecurityGroups'])) {
	$dictionary["edanz_Fees"]["fields"]["securitygroups_edanz_fees"] = array (
	  'name' => 'securitygroups_edanz_fees',
	  'type' => 'link',
	  'relationship' => 'securitygroups_edanz_fees',
	  'source' => 'non-db',
	  'vname' => 'LBL_SECURITYGROUPS_SUBPANEL_TITLE',
	);
	$dictionary["edanz_Fees"]["relationships"]["securitygroups_edanz_fees"] = array (
		'lhs_module' => 'SecurityGroups',
		'lhs_table' => 'securitygroups',
		'lhs_key' => 'id',
		'rhs_module' => 'edanz_Fees',
		'rhs_table' => 'edanz_fees',
		'rhs_key' => 'id',
		'join_table' => 'securitygroups_records',
		'join_key_lhs' => 'securitygroup_id',
		'join_key_rhs' => 'record_id',
		'relationship_type' => 'many-to-many',
		'relationship_role_column' => 'module',
		'relationship_role_column_value' => 'edanz_Fees',
	);
}

$dictionary["edanz_Fees"]["fields"]["rate_link"] = array (
				'name' => 'rate_link',
				'vname' => 'LBL_FEES_SUBPANEL_TITLE',
				'type' => 'link',
				'relationship' => 'fee_edanz_rate',
				'source' => 'non-db',
	  
	);
$dictionary["edanz_Fees"]["relationships"]["fee_edanz_rate"] = array (
				'lhs_module'=> 'edanz_Rates',
				'lhs_table'=> 'edanz_rates',
				'lhs_key' => 'id',
				'rhs_module'=> 'edanz_Fees' ,
				'rhs_table'=> 'edanz_fees',
				'rhs_key' => 'rate_id',
				'relationship_type'=>'one-to-many'
	  
	);	
	
$dictionary["edanz_Fees"]["fields"]["task_link"] = array (
				'name' => 'task_link',
				'vname' => 'LBL_FEES_SUBPANEL_TITLE',
				'type' => 'link',
				'relationship' => 'fee_task',
				'source' => 'non-db',
	  
	);
$dictionary["edanz_Fees"]["relationships"]["fee_task"] = array (
				'lhs_module'=> 'Tasks',
				'lhs_table'=> 'tasks',
				'lhs_key' => 'id',
				'rhs_module'=> 'edanz_Fees' ,
				'rhs_table'=> 'edanz_fees',
				'rhs_key' => 'task_id',
				'relationship_type'=>'one-to-many'
	  
	);	
if (!class_exists('VardefManager')){
        require_once('include/SugarObjects/VardefManager.php');
}
VardefManager::createVardef('edanz_Fees','edanz_Fees', array('basic','assignable')
);
?>
